//
//  UIView+IBExtension.swift
//  SinaWeibo
//
//  Created by 程建 on 16/9/23.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

extension UIView {

    @IBInspectable var cornerRadius: CGFloat {
        
        //IBAction
        //IBOutlet
        //@IBInspectable 定义可视化属性
        //@IBDesignable 让属性时时刷新
        set{
            //设置圆角的属性
            self.layer.cornerRadius = newValue
            self.layer.masksToBounds = newValue > 0
            
        }
        
        get{
            return layer.cornerRadius
        }
        
    }

    
}
